/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package commonlib.domain;

/**
 *
 * @author jorge.daniel.negrete
 */
public class IntTSTPair {
	  private TST<Integer> Beta;
	  private int cont_alpha;
	  public IntTSTPair()
	  {
		  Beta=new TST<Integer>();
		  cont_alpha=0;
	  }
	  public void setBeta(String Beta,int f)
	  {
		if(this.Beta.contains(Beta))
		{
		  Integer i=this.Beta.getDade(Beta);
		  i=i.intValue()+f;
		  this.Beta.setDade(Beta,i);

		}
		else
		{
			this.Beta.add(Beta,f);
		}
	  }
	  public void incAlpha(int f)
	  {
		  this.cont_alpha=this.cont_alpha+f;
	  }
	  public boolean findBeta(String b)
	  {
		  return this.Beta.contains(b);
	  }

	  public IteratorTST<Integer> getIteratorBeta()
	  {
		  return Beta.iterator();
	  }
	  public int getContAlpha()
	  {
		  return this.cont_alpha;
	  }
	  public void setContAlpha(int c)
	  {
		  this.cont_alpha=c;
	  }
	  public int getContBeta(String beta)
	  {
		  int i=Beta.getDade(beta).intValue();
		  return i;
	  }
	  public void deleteBeta(String beta)
	  {
		  this.cont_alpha=this.cont_alpha-this.Beta.getDade(beta);
		  this.Beta.delete(beta);
	  }
	}
